package String;

import java.util.Scanner;

public class str_duichen {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter the string");
        String str = sc.nextLine();

        //反转字符,因为append等是StringBuilder的操作，所以要先转成String Builder再转成String
       String result= new StringBuilder().append(str).reverse().toString();

       //比较
        if(str.equals(result))
        {
            System.out.println("The string is duichen");
        }
        else
        {
            System.out.println("The string is not duichen");
        }
    }
}
